A current 8-bit microprocessor has an addressing ability of handling a 64K-byte data at a time for a program memory and a data memory of. However, a program code to be accessed or executed by the current 8-bit microprocessor is usually more than 64K bytes. Therefore, the program code needs to be divided into a plurality of data blocks each having 64K-byte data. The plurality of data blocks are stored in an external storage medium of the 8-bit microprocessor, and the storage medium may be a non-volatile memory, e.g., a flash memory. When the 8-bit microprocessor wants to access or execute the program code, the plurality of data blocks are first accessed from the flash memory and are temporarily stored into a volatile memory (e.g., a dynamic random access memory (DRAM)), from which the 8-bit microprocessor then accesses the program code.
In order to effectively access data by the 8-bit microprocessor, partial data of each of the data blocks each having 64K-byte data are designed as having some same common data. Suppose the 8-bit microprocessor first accesses content of a data block A, and then switches from the data block A to access content of a data block B, content of the common data is accessed to obtain information for switching to the data block B, so as to avoid discontinuousness of instructions. Therefore, bank switching instructions for switching between memory banks are stored in same common data. In the prior art, all data of each data block are stored into the flash memory; however, much storage space of the flash memory is wasted for storing the common data since all data blocks contain the content of the common data. For an embedded system or other microprocessor systems, effective utilization of storage space of the flash memory is extremely important. Therefore, there is a need to provide a solution to effectively reduce the storage space of the flash memory.